  @extends("home.public.home")

  @section("content")

  <script src="/style/home/js/home/userorder.js"></script>
  <link rel="stylesheet" href="/style/home/css/home/userOrder.css">
    <link rel="stylesheet" href="/style/home/css/zhufu.css">



  <div class="msg_box">

            <div class="msg_main clearfix">
              <table  align="center" border='1px;' style="margin-left:50px;" width=80%;>
                <thead align="center">
                    <tr role="row" align="center">
                        <th align="center">商品名</th>
              <th align="center">商品图片</th>
              <th align="center">购买价格</th>
              <th align="center">购买数量</th>
              <th align="center">小计</th>
                    </tr>
                </thead>

                <?php

          $number=0;
          $money=0;
        ?>
            <tbody >
            @foreach($info as $k=>$v)

                <tr align="center">
                       <td>{{$v['goodsname']}}</td>

             <td>
              <img width="200px" src="{{$v['img']}}" alt="">
             </td>

            <td>{{$v['price']}}</td>
            <td>{{$v['num']}}</td>
            <td>{{$v['price'] * $v['num']}}</td>

            <?php
              $number+=$v['num'];

              $money+=$v['price'] * $v['num'];
             ?>

                    </tr>

              @endforeach
                <tr>
            <td colspan='2'>合计</td>
            <td  align="right">总价：{{$money}}</td>

            <td colspan='2' align="left">商品总数：{{$number}}</td>

        </tr>
             </tbody>
           </table>
    </div>


            </div>



  @endsection